package com.wwe.kotlinstudy.util

/**
 * @name KotlinStudy
 * @package name：com.wwe.kotlinstudy.util
 * @anthor DavidZhang
 * @time 2018/4/17 15:35
 * @class describe
 */
class IfStudy {

    fun maxof(a: Int, b: Int) = if (a > b) a else b

    fun test1(a: Int,b: Int) {
        val max = if (a > b) a else b
    }

    //如果if..else 分支太多，考虑用when的方式去做处理
}